// import { methods } from "../uni_modules/uview-ui/libs/mixin/mixin.js";
import http from "./http.js";

//上传图片
export const uploadImg = http.BASE_URL + "/api/common/upload";


//登录
export function login(data){
	return http.request(
	    {
	        url: "/login/index",
			method:"post",
	    },
	    data,
	    true
	);
}

//注册店长
export function register(data){
	return http.request(
	    {
	        url: "/login/register",
			method:"post",
	    },
	    data,
	    true
	);
}

//获取省市区
export function getregion(data){
	return http.request(
	    {
	        url: "/common/get_region",
			method:"get",
	    },
	    data,
	    false
	);
}


//获取banner图
export function bannerList(data){
	return http.request(
	    {
	        url: "/index/banner",
			method:"get",
	    },
	    data,
	    true
	);
}


//报单数据
export function preOrders(data){
	return http.request(
	    {
	        url: "/index/pre_orders",
			method:"get",
	    },
	    data,
	    true
	);
}


//获取系统设置
export function systemConfig(data){
	return http.request(
	    {
	        url: "/system/index",
			method:"get",
	    },
	    data,
	    true
	);
}

//公告
export function noticeList(data){
	return http.request(
	    {
	        url: "/index/notice",
			method:"get",
	    },
	    data,
	    true
	);
}


//商品列表
export function goodsList(data){
	return http.request(
	    {
	        url: "/common/list",
			method:"get",
	    },
	    data,
	    true
	);
}

//商品详情
export function goodsDetail(data){
	return http.request(
	    {
	        url: "/common/detail",
			method:"get",
	    },
	    data,
	    true
	);
}

//获取地址
export function getAddress(data){
	return http.request(
	    {
	        url: "/common/get_region",
			method:"get",
	    },
	    data,
	    true
	);
}

//个人中心
export function userInfo(data){
	return http.request(
	    {
	        url: "/user/index",
			method:"get",
	    },
	    data,
	    true
	);
}

//报单
export function submitOrder(data){
	return http.request(
	    {
	        url: "/common/pre_order",
			method:"post",
	    },
	    data,
	    true
	);
}


//保单列表
export function submitorderList(data){
	return http.request(
	    {
	        url: "/order/pre_order_list",
			method:"get",
	    },
	    data,
	    true
	);
}


//店长保单
export function createorder(data){
	return http.request(
	    {
	        url: "/order/create_order",
			method:"get",
	    },
	    data,
	    true
	);
}


//订单列表
export function orderList(data){
	return http.request(
	    {
	        url: "/order/user_orders",
			method:"get",
	    },
	    data,
	    true
	);
}


//我的团队
export function myTeam(data){
	return http.request(
	    {
	        url: "/user/my_team",
			method:"get",
	    },
	    data,
	    true
	);
}


//司机订单列表
export function driverOrderlist(data){
	return http.request(
	    {
	        url: "/driver/order_list",
			method:"get",
	    },
	    data,
	    true
	);
}


//修改派送状态
export function driverUpdatestatus(data){
	return http.request(
	    {
	        url: "/driver/update_status",
			method:"post",
	    },
	    data,
	    true
	);
}

//支付
export function payment(data){
	return http.request(
	    {
	        url: "/goods/payment",
			method:"post",
	    },
	    data,
	    true
	);
}


//业务经理数据看板
export function salerList(data){
	return http.request(
	    {
	        url: "/saler/list",
			method:"get",
	    },
	    data,
	    true
	);
}


//拍照晒单
export function feedback(data){
	return http.request(
	    {
	        url: "/user/feedback",
			method:"post",
	    },
	    data,
	    true
	);
}

//发布公告
export function addnotice(data){
	return http.request(
	    {
	        url: "/saler/add_notice",
			method:"post",
	    },
	    data,
	    true
	);
}


// 获取经理手机号
export function salerMobile(data){
	return http.request(
	    {
	        url: "/user/get_saler_mobile",
			method:"get",
	    },
	    data,
	    true
	);
}


//判断店长是否注册
export function wxLogin(data){
	return http.request(
	    {
	        url: "/login/wx_login",
			method:"post",
	    },
	    data,
	    true
	);
}


//获取店长信息
export function getmanagerinfo(data){
	return http.request(
	    {
	        url: "/common/get_manager_info",
			method:"get",
	    },
	    data,
	    true
	);
}



//引导添加桌面
export function getGuide(data){
	return http.request(
	    {
	        url: "/system/get_guide",
			method:"get",
	    },
	    data,
	    true
	);
}


//晒单历史
export function getPhotos(data){
	return http.request(
	    {
	        url: "/index/get_photos",
			method:"get",
	    },
	    data,
	    true
	);
}


//村民登录
export function villagerLogin(data){
	return http.request(
	    {
	        url: "/login/villager_login",
			method:"get",
	    },
	    data,
	    true
	);
}


//村民报单
export function createOrderS(data){
	return http.request(
	    {
	        url: "/order/create_order",
			method:"post",
	    },
	    data,
	    true
	);
}



//添加下级屯子
export function addMinVillage(data){
	return http.request(
	    {
	        url: "/common/add_min_village",
			method:"post",
	    },
	    data,
	    true
	);
}
